package com.ostrich.cloud.ostrichManagerWeb.app.controller;

import com.ostrich.cloud.common.result.Result;
import com.ostrich.cloud.ostrichGoodsSercice.model.param.AddSecKillParam;
import com.ostrich.cloud.ostrichGoodsService.client.SecKillClient;
import com.ostrich.cloud.ostrichManagerWeb.client.SeckillManagerClient;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@RestController
public class SecKillApiImp implements SeckillManagerClient {
    @Resource
    private SecKillClient secKillClient;


    @Override
    public Result createSeckill(AddSecKillParam param) throws Exception {
        Result result = secKillClient.addSecKill(param);
        return result;
    }

    @Override
    public Result getSecKill(String status) {
        Result secKill = secKillClient.getSecKill(status);
        return secKill;
    }
}
